package com.py.framework.entity;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

/**
 * 菜单树结构
 * @author Leegern
 * @date   2018年5月23日
 */
public class MenuTree {
	/** 唯一标识 **/
	private long id;
	/** 父ID **/
	private long parentId;
	/** 菜单地址 **/
	private String name;
	/** 菜单名称 **/
	private String title;
	/** 菜单图标 **/
	private String icon;
	/** 子菜单集合 **/
	private List<MenuTree> list = new ArrayList<>();
	/** 排序 **/
	private int orderBy;
	/** 菜单类型，1：子系统，2：模块，3：功能，4：资源 **/
	private int menuType;
	/** 是否显示，1：是，2：否 **/
	private int isShow;
	/** 是否新窗口打开，1：是，2：否 **/
	private int isWinOpen;
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}
	
	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}
	/**
	 * @return the parentId
	 */
	public long getParentId() {
		return parentId;
	}
	/**
	 * @param parentId the parentId to set
	 */
	public void setParentId(long parentId) {
		this.parentId = parentId;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * @return the icon
	 */
	public String getIcon() {
		return icon;
	}
	/**
	 * @param icon the icon to set
	 */
	public void setIcon(String icon) {
		this.icon = icon;
	}
	/**
	 * @return the list
	 */
	public List<MenuTree> getList() {
		return list;
	}
	/**
	 * @param list the list to set
	 */
	public void setList(List<MenuTree> list) {
		this.list = list;
	}
	public void addList(MenuTree tree) {
		this.list.add(tree);
	}
	/**
	 * @return the orderBy
	 */
	public int getOrderBy() {
		return orderBy;
	}
	/**
	 * @param orderBy the orderBy to set
	 */
	public void setOrderBy(int orderBy) {
		this.orderBy = orderBy;
	}
	/**
	 * @return the menuType
	 */
	public int getMenuType() {
		return menuType;
	}
	/**
	 * @param menuType the menuType to set
	 */
	public void setMenuType(int menuType) {
		this.menuType = menuType;
	}
	/**
	 * @return the isShow
	 */
	public int getIsShow() {
		return isShow;
	}
	/**
	 * @param isShow the isShow to set
	 */
	public void setIsShow(int isShow) {
		this.isShow = isShow;
	}
	/**
	 * @return the isWinOpen
	 */
	public int getIsWinOpen() {
		return isWinOpen;
	}
	/**
	 * @param isWinOpen the isWinOpen to set
	 */
	public void setIsWinOpen(int isWinOpen) {
		this.isWinOpen = isWinOpen;
	}
}